package com.supermap.originTest;


import com.supermap.data.*;


public class Q140711 {

    /**
     * 程序入口点
     * The entrance of the programme.
     */
    public static void main(String[] args) {

		DatasourceConnectionInfo dci = new DatasourceConnectionInfo();
		dci.setAlias("dw");
		dci.setEngineType(EngineType.PGGIS);
		dci.setServer("hp.digital-flying.com:15432");
		dci.setDatabase("dw");
		dci.setUser("postgres001");
		dci.setPassword("hsykf@2024");
		Datasource ds = new Workspace().getDatasources().open(dci);
		Datasets datasets = ds.getDatasets();
//        Dataset dsFeeder = datasets.get("t_feeder");
		DatasetVector dvFeeder = (DatasetVector) datasets.get("t_pole_1");
		System.out.println(ds.getEngineType());
		System.out.println(dvFeeder.getAllFeatures());
        QueryParameter parameter = new QueryParameter();
        parameter.setAttributeFilter("psr_state<20");
        parameter.setCursorType(CursorType.DYNAMIC);
        Recordset srcRecordset = dvFeeder.query(parameter);

		System.out.println(srcRecordset.getRecordCount());






	}


}  

